library Mend initializer init 

	private function Trig_Mend_Conditions takes nothing returns boolean
		return GetSpellAbilityId()=='A01S'
	endfunction

	private function Trig_Mend_Actions takes nothing returns nothing
		local integer i = 0
		local unit u = GetSpellTargetUnit()
		loop
			exitwhen i>2
			call UnitRemoveAbility(u, 'Bslo')
			set i=i+1
		endloop
		set u = null
	endfunction

	private function init takes nothing returns nothing
		local trigger t
		set t = CreateTrigger(  )
		call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT  )
		call TriggerAddCondition( t, Condition( function Trig_Mend_Conditions ) )
		call TriggerAddAction(t, function Trig_Mend_Actions)
	endfunction

endlibrary
